import request from '@/utils/request';

// 查询邮件列表
export async function getMailList(params) {
    return request('/api/officialwebsite/v1/subscribe/list', {
        method: 'GET',
        params
    });
}

// 导出邮件列表
export async function extractDataList(params) {
    return request('/api/officialwebsite/v1/subscribe/export/data/list', {
        method: 'POST',
        data: params,
        getResponse: true,
        encryption: false,
        isFile: true,
        responseType: 'blob',
        headers: { 'Content-Type': 'application/json' }
    });
}
/**
 * 官网-后端国家数据字典库中文
 */
export async function getCountryMailCnList(params) {
    return request('/api/officialwebsite/public/v1/subscribe/country/mail/cn/list', {
        method: 'GET',
        params
    });
}

// 获取邮箱订阅和退订数
export async function getNum() {
    return request('/api/officialwebsite/v1/subscribe/num', {
        method: 'GET'
    });
}
